Skip to content

feat: add ARCH-009 adr, tls platform hints, release lockfile fix, flaky test fixes#76

Merged
rhuanbarreto merged 20 commits into
mainfrom
fix/lockfile-and-tls-error-handling
Mar 18, 2026
Merged

feat: add ARCH-009 adr, tls platform hints, release lockfile fix, flaky test fixes#76
rhuanbarreto merged 20 commits into
mainfrom
fix/lockfile-and-tls-error-handling

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • ARCH-009 ADR: All platform detection must go through src/helpers/platform.ts — direct process.platform access is forbidden in src/. Includes automated rule enforcement.
  • TLS error hint: Shows platform-appropriate shell syntax (PowerShell on Windows, export on Unix) when suggesting NODE_EXTRA_CA_CERTS.
  • Release lockfile fix: .simple-release.js now adds bun.lock to changedFiles so the lockfile is included in the release commit.
  • Flaky test fixes: Replace Bun.$ with Bun.spawn in git tests (ARCH-007), add safeRmSync with retries for Windows EBUSY errors, increase timeouts for git-commit-heavy tests.

Test plan

  • bun run validate passes (284 tests, 14 ADR rules)
  • Previously flaky git.test.ts and git-files.test.ts now pass reliably on Windows
  • ARCH-009 rule detects process.platform usage outside platform.ts

bun install was regenerating the lockfile but simple-release only
stages files tracked in changedFiles. Adding bun.lock ensures the
lockfile is included in the release commit.
On Windows, show PowerShell syntax ($env:NODE_EXTRA_CA_CERTS=...),
on Unix show export syntax.
All platform detection must go through src/helpers/platform.ts.
Direct process.platform access outside platform.ts is forbidden.

Also fixes flaky Windows test failures:
- Replace Bun.$ with Bun.spawn in git test helpers (ARCH-007)
- Add safeRmSync with retries for Windows EBUSY errors
- Increase timeouts for git-commit-heavy tests
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 18, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: c95c535
Status: ✅  Deploy successful!
Preview URL: https://1d6a3670.archgate-cli.pages.dev
Branch Preview URL: https://fix-lockfile-and-tls-error-h.archgate-cli.pages.dev

View logs

isWindows() is true for any shell on Windows, not just PowerShell.
Now shows examples for PowerShell, cmd, and Git Bash.
When token claim fails because the user is not registered, the login
command now prompts for email and use case, submits a signup request
to the plugins API, and immediately retries the token claim (since
signups are auto-approved).
getGitHubUser now returns both login and email from the GitHub API.
The signup prompt pre-fills the email field when available.
- requestSignup now returns the token from the API response, avoiding
  a second token claim round-trip and duplicate tokens in the database
- Signup flow prompts for editor preference (Claude Code / Cursor)
- Falls back to claimArchgateToken if the signup response has no token
Match the frontend's editor choices: Claude Code, VS Code, Copilot CLI,
and Cursor.
If .archgate/adrs/ exists in the current project, suggest running
`archgate check` instead of `archgate init`.
- Login section now documents automatic signup flow for unregistered users
- Added troubleshooting section for TLS/corporate proxy errors
- Updated example output to show signup prompts and context-aware hints
- Updated beta tips to reflect CLI-based signup (no external site needed)
- All changes mirrored in PT-BR documentation
When running `archgate init` without credentials, the CLI now asks
if the user wants to install the editor plugin. If yes, it runs the
full GitHub device flow + signup inline, then continues with plugin
installation.

Skips interactive prompts in non-TTY environments (agent-driven runs)
to avoid blocking MCP servers and onboarding agents.
The device flow, signup prompt, and credential storage logic was
duplicated between login.ts and init.ts. Now both commands use
runLoginFlow() from helpers/login-flow.ts.

When the editor is already known (init --editor), the signup prompt
skips the editor question.
Write docs as if the reader is seeing them for the first time,
not announcing what changed.
@rhuanbarreto rhuanbarreto changed the title feat: ARCH-009, TLS platform hints, release lockfile fix, flaky test fixes feat: arch-009, tls platform hints, release lockfile fix, flaky test fixes Mar 18, 2026
@rhuanbarreto rhuanbarreto changed the title feat: arch-009, tls platform hints, release lockfile fix, flaky test fixes feat: add ARCH-009 adr, tls platform hints, release lockfile fix, flaky test fixes Mar 18, 2026
All beta banners across editor guides and index pages now point to
`archgate login` for signup instead of the external website.
The editor plugin section on both EN and PT-BR index pages now
links to all four editor integration guides.
Also fixes PT-BR index links to use /pt-br/ prefix.
Starlight resolves locale routes automatically, so PT-BR pages should
use /guides/... not /pt-br/guides/.... The new no-locale-prefix-in-links
rule catches this. Also fixes 28 pre-existing violations across PT-BR docs.
Regenerates llms-full.txt during CI and fails if there's a diff,
ensuring it stays in sync with documentation changes.
Adds a workflow that regenerates and auto-commits llms-full.txt
when docs content changes in a PR, matching the update-lock pattern.
Removes the manual check from the validation workflow.
The auto-commit workflow handles PRs, but the check catches
direct pushes or workflow failures.
@rhuanbarreto rhuanbarreto merged commit 15fdef5 into main Mar 18, 2026
7 of 8 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/lockfile-and-tls-error-handling branch March 18, 2026 16:06
@github-actions github-actions Bot mentioned this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant